﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataAccessLayer
{
    public class BookingRepository : Repository<Booking>
    {
        public override Booking FindById(int id)
        {
            return _context.Bookings.SingleOrDefault(o => o.ID == id);
        }

        public Booking FindByBookingNumber(string bookingNumber)
        {
            return GetAll().SingleOrDefault(o => o.BookingNumber.Equals(bookingNumber));
        }
    }
}
